package com.zking.service;

import java.util.List;
import java.util.Set;

import com.zking.dao.domain.SysResources;
import com.zking.dao.domain.SysRole;
import com.zking.dao.domain.SysUser;
import com.zking.dao.domain.SysUserRole;

public interface UserService {
    /***
     * 获取用户
     *
     * @param user
     * @return
     */
    SysUser getUser(SysUser user);

    /**
     * 获取用户权限
     *
     * @param userId userId
     * @return 用户权限
     */
    Set<String> findPermissionsByUserId(int userId);

    /**
     * 查询所有的权限
     * @return
     */
    List<SysResources> findPermissions();

    List<SysRole> findRoles();

    List<SysResources> findPermissionsByRoleId(Integer roleId);

    boolean addUser(SysUser sysUser);

    List<SysUser> findUsers();

    boolean updateUserByLock(Integer userId, Integer userEnable);

    boolean addUserRole(SysUserRole userRole);

    boolean deleteUserRole(SysUserRole userRole);
}
